<template>
  <y-base-page title="我的反馈">
    <view class="y-scroll-container">
      <view class="y-card">
        <view class="y-border-split-bottom y-padding-bottom y-margin-bottom y-flex-between">
          <view class="y-title">{{usereedbacklist.feedbackType==0?'与费用相关':usereedbacklist.feedbackType==1?'与服务相关':usereedbacklist.feedbackType==2?'为与护理员相关':'为其他类型'}}</view>
          <view class="y-detail">{{usereedbacklist.feedbackTime}}</view>
        </view>
        <view class="y-color-article">
          {{usereedbacklist.feedbackContent}}
        </view>
        <view class="picture">
          <view class="xxx" v-for="i in usereedbacklist.pictureAddress" :key="i">
             <img :src="i">
          </view>
        </view>
        <view class="address">服务地址类型：{{usereedbacklist.serviceAddressType==0?'住院':'居家'}}</view>
        <view class="hospital" v-if="usereedbacklist.serviceAddressType==0">服务医院：{{usereedbacklist.hospitalName}}</view>
      </view>
      <view class="y-card" v-if="usereedbacklist.status==1">
        <view class="y-border-split-bottom y-padding-bottom y-margin-bottom y-flex-between">
          <view class="y-title">反馈回复</view>
          <view class="y-detail">{{usereedbacklist.newestReplyTime}}</view>
        </view>
        <view class="y-color-article">
          {{usereedbacklist.replyContent}}
        </view>
      </view>
    </view>

        
    <!-- <view class="y-bottom-container y-boxshow-bottom"><view class="y-flex1 y-bottom-btn y-bottom-btn-primary">确定</view></view> -->
  </y-base-page>
</template>

<script>
import {userFeedbackParticulars,userFeedback} from '@/api/ctmkt'
export default {
  data() {
    return {
      id:'',
      usereedbacklist:[],
    };
  },
  created () {
    this.Feedback()
  },
  onLoad(options){
    this.id=options.id
    this.particulars(this.id);

  },
  methods: {
    async particulars(){
      let res = await userFeedbackParticulars(this.id)
      this.usereedbacklist= res.data.data
      console.log('resss',res);
    },
    async Feedback(){
      let res = await userFeedback()
      // this.status = res.data.data.status
      console.log(res);
      console.log(res.data.data.status);
      // console.log('this.status',this.status);
    },
  }
};
</script>

<style lang="scss" scoped>
.y-scroll-container{
  .y-card{
    
    .picture{
      display: flex;
      flex-wrap: wrap;
      margin-bottom: 10px;
      .xxx{
        width: 33.3%;
        display: flex;
        margin-top: 13px;
        justify-content: space-between;
        align-items: center;
        img{
           width: 75px;
           height: 56px;
           border-radius: 5px;
        }
      }
    }
    .address{
      margin-top: 14px;
      color: #070707;
    }
    .hospital{
      margin-bottom: 14px;
      color: #070707;
    }
  }
}

</style>
